package com.junko.dao.app;

import com.junko.core.base.BaseDao;
import com.junko.model.app.User;
import org.springframework.stereotype.Repository;

@Repository
public class UserDao extends BaseDao<User> {

    public User findByUserName(String userName) {
        return getSqlSession().selectOne(this.getNameSpace() + ".findByUserName",userName);
    }

    public User findByMobile(String mobile) {
        return getSqlSession().selectOne(this.getNameSpace() + ".findByMobile",mobile);
    }

    public User findByIdFetchInfo(Integer id) {
        return getSqlSession().selectOne(this.getNameSpace() + ".findByIdFetchInfo",id);
    }
}